package com.lagou.task08;

public class FinalMemberTest {
//    private final int cnt=1;  //显示初始化
    private final int cnt;
    /*{
        cnt = 2; //构造块中初始化
    }*/

    public FinalMemberTest() {
        cnt = 3;   //构造方法体中初始化
    }
    public static void main(String[] args) {
        FinalMemberTest fmt = new FinalMemberTest();
        System.out.println("cnt:" + fmt.cnt);
    }
}
